<?php
/**
 * User: YL
 * Date: 2019/6/10
 */

namespace restful\utils;

use think\Container;

class Dispatch
{
    public static function get()
    {
        $class = Env::get('runtime.prefix', '');
        $class .= Helper::studly(Env::get('runtime.controller', ''));

        $app = Container::getInstance()->get('app');
        $method = Env::get('runtime.method', '');

        return [Container::getInstance()->make($class, [$app]), $method];
    }
}